package de.tabuma.wsdl2xform.lib;

import java.util.*;

/**
 *
 * @author $Author: alefen $
 * @version $Revision: 1.4 $
 * @since $Date: 2009/07/21 20:02:17 $
 */
public class countryValidator {

    private static String countryList[] = {
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Germany"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Belgium"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Bulgarien"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Denmark"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Estonia"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Finland"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("France"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Greece"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Ireland"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Italy"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Latvia"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Lithuania"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Luxembourg"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Malta"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Netherlands"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Austria"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Poland"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Portugal"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Romania"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Sweden"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Slovakia"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Slovenia"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Spain"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Czech_Republic"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Hungary"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("United_Kingdom"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("Cyprus"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("USA"),
        java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("other")
    };

    public static String[] getList() {
        return countryList;
    }
    public static boolean isInCountryList(String str) {
        if(str.equals("")) {
            return true;
        }
        if(str.equals(java.util.ResourceBundle.getBundle(de.tabuma.wsdl2xform.constants.projectLanguageBundle).getString("other"))) {
            return false;
        }
        for(int i=0;i<countryList.length;i++) {
            if(countryList[i].equals(str)) {
                return true;
            }
        }
        return false;
    }
}
